# print('hello yumoz')
# print("hello yumoz")
# print("hello \n this is yumoz")
# print("hello \t this is tab ")
# print("hello I\'m yumoz ")  #转义字符
# print("this is a test \"\" not '' ")
#
# # 变量
# firstVariable = 'hello yumoz this is variable'
# print(firstVariable)
#
# # 字符串操作

''' 
# print(firstVariable.lower())
# print(firstVariable.upper())
# print(firstVariable.title()) # 首字母大写
# # help(firstVariable.lower) # help use

print("___________________")
# 拆分字符串
my_var = "hello yumoz"
a= my_var.split(' ')
print(a)
print(' '.join(a))

print("0" + "1")
print("0"*3)
b = "hello"+"yumoz"
print(b)
'''

'''

print("基础数学测试")
print((2**3))

print("if test---------------")

num = 3
if num == 3:
    print("num = 3")
if num % 3 == 0:
    print("num % 3 == 0")
if True:
    print("output is true")

if num>2 and num<5:
    print("true")
    print(num)
if num>2 or num<5:
    print(" num>2 or num<5:")
print(not num<5)
print(num < 5)

print("-------use of else---------")
if num > 2:
    print("Hi num = 3, > 2")
else:
    print("num < 2")

if num % 2 == 0:
    print("num%2 == 0")
else:
    print("num is odd")

print("------------use of elif--------")
if num > 4:
    print("num > 1")
elif num == 2:
    print("num = 2")
elif num == 3:
    print("num = 3")
else:
    print("not above")

my_num = 5
if my_num % 2 == 0:
    print("Your number is even")
elif my_num % 2 != 0:
    print("Your number is odd")
else:
    print("Are you sure your number is an integer?")
'''

print(" 列表测试")
a = [1,2,3,4,5,6]
print(a)
print(a[0])
print(a[1])
print(a[-1])
print(a[0:2])
print(a[:2])
print(a[3:])
print(min(a),max(a),len(a),sum(a)) # 列表中最小，最大，长度，总和
print("统计列表中对象出现次数：")
random_list  = [2,3,2,2,2,1,4,5,3,1,5,3,7,2]
count = random_list.count(2)
print(count)
print("返回列表第一个指针：")
ptr = random_list.index(1)
print(ptr) # 1出现在第五个，从0开始
# help(random_list.index)
# # random_list.index(value, [start, stop])
ptr1 = random_list.index(2,5,5)
print(ptr1)